from fastapi import FastAPI
from typing import Union
from src import zzx

app = FastAPI()

@app.get("/")
def hello_world():
    return zzx.select()

@app.get("/a")
def hello_world():
    return zzx.select_list()

@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
    return {"item_id": item_id, "q": q}